ROBOT PRODUCTION TREATED WITH ARDUiNO by Elif AVCU

ROBOT PRODUCTION TREATED WITH ARDUiNO by Elif AVCU

Author:Elif AVCU [AVCU, Elif]
Language: eng
Format: azw3
Published: 2018-11-26T16:00:00+00:00


void loop()

{

delay(500);

servo.write(90);

scan();

FrontDistance = distance;

if(FrontDistance > 40 || FrontDistance == 0)

{

moveForward();

}

else

{

moveStop();

servo.write(167);

delay(500);

scan();

LeftDistance = distance;

servo.write(0);

delay(500);

scan();

RightDistance = distance;

if(RightDistance < LeftDistance)

{

moveLeft();

delay(500);

}

else if(LeftDistance < RightDistance)

{

moveRight();

delay(500);

}

else

{

moveBackward();

delay(200);

moveRight();

delay(200);

}

}

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.